#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<math.h>

int main()
{
	int centerX = 300;
	int centerY = 300;
	int radius = 200;
	double a = sqrt(3);
	double offset = a * radius / 2;
	
	initgraph(600, 600);
	setbkcolor(WHITE);
	cleardevice();

	for (radius = 200;radius > 0;radius = radius - 40)
	{
		double offset = a * radius / 2;
		int littleradius = radius - 10;
		double littleoffset = a * littleradius / 2;
		setlinecolor(BLACK);
		POINT pts[] = { {centerX,centerY - radius}, {centerX + offset,centerY - radius / 2}, {centerX + offset,centerY + radius / 2},{centerX,centerY + radius},{centerX - offset,centerY + radius / 2},{centerX - offset,centerY - radius / 2} };
		polygon(pts, 6);

		setlinecolor(BLACK);
		POINT ptslittle[] = { {centerX,centerY - littleradius}, {centerX + littleoffset,centerY - littleradius / 2}, {centerX + littleoffset,centerY + littleradius / 2},{centerX,centerY + littleradius},{centerX - littleoffset,centerY + littleradius / 2},{centerX - littleoffset,centerY - littleradius / 2} };
		polygon(ptslittle, 6);
	}

	
	_getch();
}